<template>
	<view>
	<video id="myVideo"  controls="controls" @fullscreenchange="fullscreenchange"  src="https://pic.fhshidai.com/user/159344049100091u3zq3s6hl.mp4"></video>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				controls:true,
			};


		},
		onReady: function(res) {

				// #ifdef MP-TOUTIAO
					this.videoContext = tt.createVideoContext('myVideo')
				// #endif
				// #ifndef MP-TOUTIAO
					this.videoContext = uni.createVideoContext('myVideo')
				// #endif

				 			this.videoContext.requestFullScreen()
		},
		methods:{
			fullscreenchange(event) {
				console.log(event)
				/* if (event.detail.fullScreen == false) {
					this.videoContext.pause()
					this.is_open = false
				} */
			}
		}

	}
</script>

<style lang="scss">
.video{
	width: 100%;
	height: auto;
}
</style>
